<!doctype html>
<script src="https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.11/lodash.js"></script>

Function <code>handler</code> is called on this input:
<br>
<input id="input1" placeholder="type here">

<p>

Debounced function <code>debounce(handler, 1000)</code> is called on this input:
<br>
<input id="input2" placeholder="type here">

<p>
<button id="result">The <code>handler</code> puts the result here</button>

<script>
  function handler(event) {
    result.innerHTML = event.target.value;
  }

  input1.oninput = handler;
  input2.oninput = _.debounce(handler, 1000);
</script>